package com.fdb.efp.limit.service.vo;

import java.math.BigDecimal;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fdb.basic.framework.core.constant.BaseConstant;
import com.fdb.basic.framework.core.util.DateTool;

public class ProcessResponseVO {
	
	@JsonProperty("St")
	private String status;//状态
	@JsonProperty("ApplyAmt")
	private BigDecimal applyAmt;//申请金额
	@JsonProperty("ApplyTp")
	private String applyTp;//申请类型  001:额度申请 002 提额申请 003 激活申请
    @JsonProperty("ApplyDt")
	private String applyDt;//申请日期 
    @JsonProperty("ProdCd")
    private String prodCd;//产品代码  prdid
    @JsonProperty("ProdName")
    private String prodName;//产品名称 prdname
    @JsonProperty("OrgLegalBrchNo")
    private String orgLegalBrchNo;//法人机构号 
    @JsonProperty("OrgLegalBrchName")
    private String orgLegalBrchName;//法人机构名称
    @JsonProperty("OrgLegalBrchShrtName")
    private String brchShrtName;//法人机构简称

    
    
    @JsonIgnore
	public String getStatus() {
		return status;
	}
    @JsonIgnore
	public void setStatus(String status) {
		switch (status) {
		case BaseConstant.APPR_STATUS_111:
			this.status = "100"; //审核中
	        break;
		case BaseConstant.APPR_STATUS_997:
			this.status = "101"; //审核通过
			break;
		case BaseConstant.APPR_STATUS_998:
			this.status = "102"; //审核不通过
			break;
		}
	}
    @JsonIgnore
	public BigDecimal getApplyAmt() {
		return applyAmt;
	}
    @JsonIgnore
	public void setApplyAmt(BigDecimal applyAmt) {
		this.applyAmt = applyAmt;
	}
    @JsonIgnore
	public String getApplyTp() {
		return applyTp;
	}
    @JsonIgnore
	public void setApplyTp(String applyTp) {
		this.applyTp = applyTp;
	}
    @JsonIgnore
	public String getApplyDt() {
		return applyDt;
	}
    @JsonIgnore
	public void setApplyDt(String applyDt) {
		this.applyDt = applyDt;
	}
    @JsonIgnore
	public String getProdCd() {
		return prodCd;
	}
    @JsonIgnore
	public void setProdCd(String prodCd) {
		this.prodCd = prodCd;
	}
    @JsonIgnore
	public String getProdName() {
		return prodName;
	}
    @JsonIgnore
	public void setProdName(String prodName) {
		this.prodName = prodName;
	}
    @JsonIgnore
	public String getOrgLegalBrchNo() {
		return orgLegalBrchNo;
	}
    @JsonIgnore
	public void setOrgLegalBrchNo(String orgLegalBrchNo) {
		this.orgLegalBrchNo = orgLegalBrchNo;
	}
    @JsonIgnore
	public String getOrgLegalBrchName() {
		return orgLegalBrchName;
	}
    @JsonIgnore
	public void setOrgLegalBrchName(String orgLegalBrchName) {
		this.orgLegalBrchName = orgLegalBrchName;
	}
    @JsonIgnore
	public String getBrchShrtName() {
		return brchShrtName;
	}
    @JsonIgnore
	public void setBrchShrtName(String brchShrtName) {
		this.brchShrtName = brchShrtName;
	}
	/**
	 * 查询出的结果组装成返回的bean
	 * @return
	 */
	public static ProcessResponseVO result2ProcessResponse(String applyTp,LmtPrdContVO lmtPrdContVO,LmtIndivAppVO lmtIndivAppVO) {
		ProcessResponseVO processResponseVO = new ProcessResponseVO();
		processResponseVO.setApplyTp(applyTp);
		if (lmtIndivAppVO==null) {//激活申请
			processResponseVO.setStatus(lmtPrdContVO.getApproveStatus());
			processResponseVO.setApplyAmt(lmtPrdContVO.getLmtAmt());
			processResponseVO.setApplyDt(DateTool.formatDate(lmtPrdContVO.getSignDate(), DateTool.PATTERN_DATE_COMPACT));
			processResponseVO.setProdCd(lmtPrdContVO.getPrdCode());
			processResponseVO.setApplyTp(applyTp);
			processResponseVO.setProdName(lmtPrdContVO.getPrdName());
			processResponseVO.setOrgLegalBrchNo(lmtPrdContVO.getLegalOrgCode());
			processResponseVO.setOrgLegalBrchName(lmtPrdContVO.getLegalOrgName());
		}else {//额度申请
			processResponseVO.setStatus(lmtIndivAppVO.getApproveStatus());
			processResponseVO.setApplyAmt(lmtIndivAppVO.getApplyAmt());
			processResponseVO.setApplyTp(applyTp);
			processResponseVO.setApplyDt(DateTool.formatDate(lmtIndivAppVO.getApplyDate(), DateTool.PATTERN_DATE_COMPACT));
			processResponseVO.setProdCd(lmtIndivAppVO.getPrdCode());
			processResponseVO.setProdName(lmtIndivAppVO.getPrdName());
			processResponseVO.setOrgLegalBrchNo(lmtIndivAppVO.getLegalOrgCode());
			processResponseVO.setOrgLegalBrchName(lmtIndivAppVO.getLegalOrgName());
		}
		return processResponseVO;
	} 
		     
}
